#ifndef exceptions_h
#define exceptions_h
#include <stdexcept>
namespace sys
{
 	using std::runtime_error;
 	using std::exception;
 	
	class runtime_error_ex : public runtime_error
	{
	public:
		enum {BUFFER_SIZE = 1024*4};

	private:
		char m_szBuffer[BUFFER_SIZE];
	protected:
		runtime_error_ex();
		void SetMessage(const char * pFormat,...) throw();
	public:
		virtual const char * what() const throw();
		runtime_error_ex(const char * pFormat,...);
	};

	class file_not_found : public runtime_error_ex
	{
	public:
		file_not_found(const char * pszFileName);
	};

	class parse_error : public runtime_error_ex
	{
	public:
		parse_error(const char * pszExpected,
			        const char * pszFound = "EOF");
	};

	class not_implemented : public runtime_error_ex
	{
	public:
		not_implemented(const char * pszWhat);
	};
}
#endif
